package com.db.concurrency;

public class SynchronizedCounter implements Counter {

  private long counter = 0;
  
  public SynchronizedCounter() {
  }

  @Override
  public synchronized void increment() {
    counter++;
  }

  @Override
  public synchronized long getCounter() {
    return counter;
  }

}
